package gameinfo;

/**
 * Container of the Level objects. Provide an access of the Level object that it has,
 * and the possibility to add new Levels
 * @author quique
 */
public class CollectionOfLevels {
        
        /**
         * Keeps the 5 level class that contains the info of the levels.
         */
    	private Level[] levels;
	
        /**
         * Contructor
         * @param numberOfLevels
         */
        public CollectionOfLevels(int numberOfLevels){
            levels = new Level[numberOfLevels];
        }
        /**
         * Return the level. The count is from 1 to 5
         * @param numberOfLevel
         * @return the corresponding level
         * @see Level
         */
	public Level getLevel(int numberOfLevel) {
            return levels[numberOfLevel-1];
	}
	
        /**
         * Add the indicated level to the collection, the count is from 1 to 5.
         * @param level
         * @param numberOfLevel
         */
	public void addLevel(Level level, int numberOfLevel) {
            levels[numberOfLevel-1] = level;
	}
	 
}
 
